{% load static %}
<!DOCTYPE html>
<!-- saved from url=(0123)http://demo.wcpdoc.com/webtype/view2c902a8d6dc8c1da016dc9035b900043/Pub1.html?typeDomainId=2c902a8d6dc8c1da016dc9035b900043 -->
<html lang="zh-CN"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<!--<base href="http://demo.wcpdoc.com:80/">--><base href=".">

<!--<base href="http://demo.wcpdoc.com:80/">--><base href=".">

<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1,user-scalable=no">

.wcp-knowtype-right-operator {
	float: right;
	margin-top: -3px;
	margin-left: 4px;
}
</style>

    <script type="text/javascript" src='{% static "js/jquery-1.8.0.min.js" %}'></script>
    <link href='{% static "css/bootstrap.min.css" %}' rel="stylesheet">

    <link href='{% static "css/bootstrap-theme.min.css" %}' rel="stylesheet">
    <script type="text/javascript" src='{% static "js/bootstrap.min.js" %}'></script>
    <script type="text/javascript" src='{% static "js/respond.min.js" %}'></script>

    <link href='{% static "css/web-base.css" %}' rel="stylesheet">

    <script type="text/javascript">
        var basePath = 'http://demo.wcpdoc.com:80/';
        $(function() {
            $.ajaxSetup({
                cache: false
            });
        })
        //-->
    </script>
    <link href='{% static "css/web-succinct.css" %}' rel="stylesheet">
    <link href='{% static "css/wcp-photoImgs.css" %}' rel="stylesheet">
    <style type="text/css">
        .wcp-photo-box {
            margin-bottom: 20px;
            margin-top: 0px;
        }

        .wcp-photo-box a {
            color: #4d5356;
        }

        .wcp-photo-box a:HOVER {
            color: #D9534F;
        }
    </style>
</head>

<body>
	




<!-- class="navbar navbar-default|navbar-inverse" -->
<style>
<!--
.imgMenuIcon {
	width: 16px;
	height: 16px;
	margin-right: 4px;
	margin-left: -2px;
	margin-top: -2px;
}
-->
</style>

    {% include "navbar.html" %}

<script>
	//初始化判断如果页面在iframe中则不显示head和foot
	initIframeStyle();
	$(function() {
		initIframeStyle();
	});
	function initIframeStyle() {
		if (self != top) {
			$('.navbar').hide();
			$('.super_content').hide();
			$('.super_contentfoot').remove();
			$('.foot').hide();
			$('.wcp-doc-rsg').hide();
			$('.wcp-doc-operate').children().hide();
			$('.wcp-doc-operate').append('<a class="btn btn-default  btn-xs" target="_blank" href="'+window.location.href+'"><span class="glyphicon glyphicon-new-window"></span> &nbsp;新窗口打开</a>');
			$('.towcodeTooltipfalg').hide();  
		}
	}
</script>


<!-- 确认框和提示框组件，使用方法在最下方！confirm和alert的bootstrap实现 -->
<div id="ycf-alert" class="modal">
	<div class="modal-dialog modal-sm">
		<div class="modal-content">
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal">
					<span aria-hidden="true">×</span><span class="sr-only">Close</span>
				</button>
				<h5 class="modal-title">
					<i class="fa fa-exclamation-circle"></i> [Title]
				</h5>
			</div>
			<div class="modal-body small">
				<p>[Message]</p>
			</div>
			<div class="modal-footer">
				<button type="button" class="btn btn-primary ok" data-dismiss="modal">[BtnOk]</button>
				<button type="button" class="btn btn-default cancel" data-dismiss="modal">[BtnCancel]</button>
			</div>
		</div>
	</div>
</div>
<script type="text/javascript">
	//Modal.alert({msg: '内容',title: '标题',btnok: '确定',btncl:'取消'});
	//Modal.confirm({msg : "是否删除角色？"}).on(function(e) {alert("返回结果：" + e);});
	$(function() {
		//控制内容中的图片，在缩放情况下不变形
		$('#docContentsId img').attr('height',''); 
		window.Modal = function() {
			var reg = new RegExp("\\[([^\\[\\]]*?)\\]", 'igm');
			var alr = $("#ycf-alert");
			var ahtml = alr.html();
			var _alert = function(options) {
				alr.html(ahtml); // 复原
				alr.find('.ok').removeClass('btn-primary').addClass(
						'btn-primary');
				alr.find('.cancel').hide();
				_dialog(options);

				return {
					on : function(callback) {
						if (callback && callback instanceof Function) {
							alr.find('.ok').click(function() {
								callback(true)
							});
						}
					}
				};
			};
			var _confirm = function(options) {
				alr.html(ahtml); // 复原
				alr.find('.ok').removeClass('btn-primary').addClass(
						'btn-primary');
				alr.find('.cancel').show();
				_dialog(options);
				return {
					on : function(callback) {
						if (callback && callback instanceof Function) {
							alr.find('.ok').click(function() {
								callback(true)
							});
							alr.find('.cancel').click(function() {
								callback(false)
							});
						}
					}
				};
			};
			var _dialog = function(options) {
				var ops = {
					msg : "提示内容",
					title : "操作提示",
					btnok : "确定",
					btncl : "取消"
				};
				$.extend(ops, options);
				console.log(alr);
				var html = alr.html().replace(reg, function(node, key) {
					return {
						Title : ops.title,
						Message : ops.msg,
						BtnOk : ops.btnok,
						BtnCancel : ops.btncl
					}[key];
				});

				alr.html(html);
				alr.modal({
					width : 500,
					backdrop : 'static'
				});
			}
			return {
				alert : _alert,
				confirm : _confirm
			}
		}();
	});
</script>
<!-- system modal end -->
<script type="text/javascript">
	function luceneSearch(key) {
		$('#wordId').val(key);
		$('#lucenesearchFormId').submit();
	}
	function luceneSearchGo(page) {
		$('#pageNumId').val(page);
		$('#lucenesearchFormId').submit();
	}
//-->
</script>


	


<div class="super_content">
</div> 
	<div class="containerbox" style="min-height: 397px;">
		<div class="container ">
			<div class="row">
				<div class="col-sm-12">
					<div class="unit" style="padding-bottom: 10px;">
						<div class="title">



	<div class="hidden-sm hidden-xs hidden-md wcp-knowtype-lefttop-title" style="float: left;">
		
		
        <span class="glyphicon glyphicon-fire  column_title">&nbsp;{{ category.title }}</span>
        
		
	</div>


							<!--列表操作按钮（网格/列表/排序条件等） -->
							


						</div>
						<hr style="clear: both; border: 0px;">
					</div>
				</div>
			</div>
			<div class="row">
				<div class="col-xs-3">
					


<div class="wcp-su-out-box">
	<div class="unit">
		<div id="loadingDivId"></div>
		<ul id="docRoottypeUl" class="doctypeUl" style="padding-left: 30px;">
            <li>
                <h5 class="showLableTypenull">
                    <a class="linkTitle linklevel1 {% if request.GET.sub_id is None %}active{% endif %}" href="{% url 'category' category.pk %}">
                        {{ category.title }}
                    </a>
                    <span class="farm_tree_num">{{ category.article_set.count }}</span>
                </h5>
                
                <ul id="" style="display: block;">

                    {% for subcategory in category.subcategory_set.all %} 
                        <li>
                            <h5 class="showLableTypenull">
                                <a class="linkTitle linklevel2 {% if request.GET.sub_id == subcategory.id|title %}active{% endif %}" href="{% url 'category' category.pk subcategory.pk %}">
                                    {{ subcategory.title }}
                                </a>
                                <span class="farm_tree_num">{{ subcategory.article_set.count }}</span>
                            </h5>
                        </li>
                    {% endfor %}
                </ul>
            </li>
        </ul>
	</div>
</div>
<script type="text/javascript">
	var type_collapse_level = 3;
</script>


	<script type="text/javascript">
		var type_collapse_level = 2;
	</script>


				</div>
				<div class="col-xs-9" style="padding-left: 5px;">
					
					<!-- 结果集合 -->
					



<!-- DOCID,title,DOCDESCRIBE,AUTHOR,PUBTIME,TAGKEY
	 *         ,IMGID,VISITNUM,PRAISEYES,PRAISENO,HOTNUM,EVALUATE,ANSWERINGNUM,
	 *         TYPENAME -->



	<div class="wcp-su-out-box" style="margin-bottom: 4px;">
		<div class="unit" style="margin-top: 0px; padding-top: 0px; padding-bottom: 0px; margin-bottom: 0px; padding-left: 10px; padding-right: 0px;">
			<!-- 列表展示知识 -->
			




<style>
.tagsearch {
	cursor: pointer;
	padding: 2px;
	padding-left: 4px;
	padding-right: 4px;
	font-size: 12px;
	background-color: #aaa;
}

.wcp-typetop {
	font-size: 0.7em;
	padding-left: 6px;
	padding-right: 6px;
	padding-top: 2px;
	padding-bottom: 2px;
	position: relative;
	top: -3px;
}

.wcp-coin-flag {
	width: 1.2em;
	height: 1.2em;
	margin-top: -3px;
}
</style>
<div class="stream-list p-stream doc_brief">


    {% for article in articles %}

        <div class="stream-item" id="loop-30">
            <div class="media">

                {% if article.thumbnail %}
                    <div class="pull-right hidden-xs doc-brief-imgbox">
                        <div class="effect-img-box" style="width: 100%; overflow: hidden; padding-top: 6px;">
                            <a class="doc_node_title" target="_blank" href="{% url 'article' article.pk %}">
                                <img class="effect-img" src="{{ article.thumbnail.url }}">
                            </a>
                        </div>
                    </div>
                {% endif %}


                <div class="media-body">
                    <div style="margin-left: 4px;" class="pull-left">
                        <div class="doc_node_title_box">
                            <a class="doc_node_title" target="_blank" href="{% url 'article' article.pk %}">


                                <span class="glyphicon glyphicon-book"></span>

                                {{ article.title }}
                            </a>
                        </div>


                        <div>
                            <p class="doc_node_content" style="margin-bottom: 4px; height: auto;">

                                {{ article.content|truncatechars:"400" }}

                            </p>
                        </div>

                        <div style="max-height: 48px; overflow: hidden; margin-bottom: 4px;">

                            {% for tag in article.tags.all %}
                                <span class="label label-default" title="{{ tag.title }}">
                                    {{ tag.title }}
                                </span>
                            {% endfor %}

                        </div>
                        <div class="side_unit_info side_unit_info_left_box">
                            <i class="glyphicon glyphicon-user"></i>
                                <span>{{ article.author.username }}</span>
                            &nbsp;&nbsp;&nbsp;
                                {{ article.create_time|date:"Y-m-d H:i:s" }}
                            &nbsp;&nbsp;&nbsp; <a href="webtype/view402880e95c2fdd9b015c3017e719002c/Pub1.html">
                            </a> &nbsp;&nbsp;&nbsp;  <span title="阅读量"> <i class="glyphicon glyphicon-hand-up"></i>
                                {{ article.view_count }}
                            </span> <span title="评论数"> <i class="glyphicon glyphicon-comment"></i>
                                {{ article.comment_set.count }}
                            </span>

                        </div>
                    </div>
                </div>
            </div>
        </div>

    {% endfor %}

	
	
</div>
<script type="text/javascript" src='{% static "js/wcp-photoImgs.js" %}'></script>
<script type="text/javascript">
	$(function() {
		//标签
		$('.tagsearch').bind('click', function() {
			luceneSearch('TAG:' + $(this).text());
		});
		//格式化知识图片
		initPhotoImgsSize('.effect-img-box');
		$(window).resize(function() {
			initPhotoImgsSize('.effect-img-box');
		});
		$(".effect-img").load(function() {
			initPhotoImgSize($(this).parents('.effect-img-box'));
		});
	});
</script></div>
	</div>



					
				</div>
			</div>
		</div>
	</div>
	



<div class="super_contentfoot  hidden-xs" style="margin: 0px;">
	<div class="container ">
		<div class="row">
			<div class="col-sm-1">



<style>
/* tooltip */
#tooltip {
	position: absolute;
	border: 1px solid #fff;
	background: #fff;
	padding: 3px 3px 3px 3px;
	color: #333;
	display: none;
}
</style>
<script>
	$(function() {
		var towcodelinkurl = location.href;
		$('.towcodelink').attr('href', towcodelinkurl);
		initTowCodeTooltip('.towcodeTooltipfalg',
				'http://demo.wcpdoc.com:80/home/PubQRCode.do', -170, 20);
		initTowCodeTooltip('.towcodeTooltipfalgOpposite',
				'http://demo.wcpdoc.com:80/home/PubQRCode.do', 0, -175);
	});
	function initTowCodeTooltip(objKey, imgurl, x, y) {
		$(objKey)
				.live(
						'mouseover',
						function(e) {
							this.imgTitle = this.title;
							this.title = "";
							var imgTitle = this.imgTitle ? "<br/>"
									+ this.imgTitle : "";
							var tooltip = "<div id='tooltip'><img style='max-width: 150px;' src='"+ imgurl +"' alt='预览图'/>"
									+ imgTitle + "<\/div>"; //创建 div 元素
							$("body").append(tooltip);
							$("#tooltip").css({
								"top" : (e.pageY + y) + "px",
								"left" : (e.pageX + x) + "px"
							}).show("fast"); //设置x坐标和y坐标，并且显示
						});

		$(objKey).live('mouseout', function(e) {
			this.title = this.imgTitle;
			$("#tooltip").remove();
		});
		$(objKey).live('mousemove', function(e) {
			$("#tooltip").css({
				"top" : (e.pageY + y) + "px",
				"left" : (e.pageX + x) + "px"
			});
		});
	}
</script></div>
			<div class="col-sm-11 putServerBox">
				<ul id="recommendServiceList" class="footServerUl">
					
					
				</ul>
			</div>
		</div>
	</div>
</div>
	


<div class="foot">
    Share Cheese
	
</div>
<script type="text/javascript">
	$(function() {
		$(window).resize(function() {
			$('.containerbox').css('min-height', $(window).height() - 170);
		});
		$('.containerbox').css('min-height', $(window).height() - 170);
	});
</script>

</body></html>
